import { Controller, Get, InternalServerErrorException } from '@nestjs/common';
import { AppService } from './app.service';

@Controller()
export class AppController {
  constructor(private readonly appService: AppService) { }

  @Get('')
  getHello(): string {
    return this.appService.getHello();
  }

  @Get('/error')
  test(): string {
    throw new InternalServerErrorException('错误啦');
  }
}
